/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package regras;

import Interfaces.CheckerRule;

/**
 *
 * @author Tainá, Ana Luiza e Amanda
 */
public class RuleSize01 implements CheckerRule {
    public String password;

    public RuleSize01(String pwd) {
        this.password = pwd;
    }
    
    @Override
    public int rule(){
        int total = 0;
        if (password.length()<=5)
            total +=3;
        
        else if (password.length()>5 && password.length()<=8)
            total += 6;
        
        else if (password.length()>8 && password.length()<=16)
            total +=12;
        
        else if (password.length()>16)
            total +=18;
        
        return total;
    }
}
